﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Data;
using System.Data.OleDb;
using System.Data.Odbc;

namespace WFDataBaseProject.Helpers
{
    public class SQLTypes:IEnumerable<string>
    {
        string[] excludedelements = new string[] {"value__","ToString","GetHashCode","CompareTo","GetTypeCode","GetType","HasFlag","Equals" };

        static public TypeOfConnection ConnectionType { get; set; }
        
        public IEnumerator<string> GetEnumerator()
        { 
                    Type t = typeof(DbType);
                    var query = (from el in t.GetMembers() select el.Name).Except(excludedelements);
                    return query.GetEnumerator();     
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
           
                    Type t = typeof(DbType);
                    var query = (from el in t.GetMembers() select el.Name).Except(excludedelements);
                    return query.GetEnumerator();     
           
        }
    }
}
